"""作业"""

def diving():
    """幸存者游戏"""
    ship = [x + 1 for x in range(30)]
    idx = 0
    num = 0
    counts = 0
    while counts < 15:
        if ship[idx]:
            num += 1
            if num == 9:
                ship[idx] = 0
                num = 0
                counts += 1
        idx += 1
        idx %= 30
def my_sort(list1):
    """冒泡排序"""
    for _ in range(len(list1) - 1):
        swap = False
        for index in range(len(list1) - 1):
            if list1[index] > list1[index + 1]:
                list1[index], list1[index + 1] = list1[index + 1], list1[index]
                swap = True
        if not swap:
            break
    return list2

def my_math(a, b):
    """最大公因数2"""
    if a == 0 or b == 0:
        return a + b
    return my_math(b, a % b)

def main():
    """主函数"""
    print(my_math(27, 15))

if __name__ == '__main__':
    main()
